CC       = cl
LINK	 = link
DEFINES  = -DWIN32
OUTNAME	 = spotify_lastfm
CFLAGS   = /nologo /MD /W3 /EHsc /FD $(DEFINES) -I. /O1 /GL
LFLAGS   = /NOLOGO /DLL /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /LTCG -incremental:no -release ws2_32.lib user32.lib kernel32.lib advapi32.lib shell32.lib

OFILES 	 =	Main.obj\
			SpotifyLastFmPlugin.obj\
			BlockingClient.obj\
			EncodingUtils.obj\
			ScrobSubmitter.obj

all:		whole

whole:   	$(OFILES)
			link $(OFILES) $(LFLAGS) $(LIBS) -out:$(OUTNAME).dll

clean:
			@del *.obj
			@del *.dll
			@del *.exp
			@del *.lib
			@del *.map
			@del *.idb
			@del *.pdb
			@del *.manifest

.cpp.obj:
    $(CC) -c $(CFLAGS) /Fo$(<R).obj $<

